import request from '../utils/request'
export function getOpenId(code,openId) {
  return request.ajax({
      url: `/member/getOpenId`,
      method: 'get',
      params:{code:code,openId:openId},
      noNeedToken:true
  })
}

//自动登录
export function autoLogin(openId) {
  return request.ajax({
      url: `/member/auto-login`,
      method: 'post',
      params:{openId:openId}
  })
}

//通过手机号注册
export function register(params) {
  return request.ajax({
    url: '/member/register',
    method: 'post',
    loading: true,
    params
  })
}

//更新手机号
export function flushPhone(params) {
  return request.ajax({
    url: '/member/flushPhone',
    method: 'post',
    loading: true,
    params
  })
}


//自动登录
export function updateBasicInfo(params) {
  return request.ajax({
      url: `/member/update/basic/info`,
      method: 'post',
      loading: true,
      isJson: true,
      params
  })
}
//刷新
export function reload() {
  return request.ajax({
      url: `/member/reload`,
      method: 'post',
      loading: true
  })
}
//刷新
export function loginOut() {
  return request.ajax({
      url: `/member/loginout`,
      method: 'post',
      loading: true
  })
}
//获取最新数据
export function getMember() {
  return request.ajax({
      url: `/member/getMember`,
      method: 'post',
      loading: true
  })
}

export function showFollowSer() {
  return request.ajax({
      url: `/member/showFollowSer`,
      method: 'post'
  })
}



